import requests
class ApiBase:
    def __init__(self):
        self.url='http://10.59.9.18/'
        self.session=requests.session()

    def request(self,method,path,**kwargs):
        url=f"{self.url}{path}"
        print(f"请求{method},{url}")
        requests = self.session.request(method,url,**kwargs)
        return requests

    def post(self,path,**kwargs):
        return self.request("POST",path,**kwargs)

    def get(self,path,**kwargs):
        return self.request("GET",path,**kwargs)

    def put(self,path,**kwargs):
        return self.request("PUT",path,**kwargs)

    def delete(self,path,**kwargs):
        return self.request("DELETE",path,**kwargs)